package com.ruoyi.common.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class EnvironmentConfig {

    @Value("${system.environment}")
    private String environment;

    private static String staticEnvironment;

    @PostConstruct
    public void init() {
        staticEnvironment = this.environment;
    }

    public static String getStaticEnvironment() {
        return staticEnvironment;
    }
}
